import request from '@/utils/request'
//查询盘点记录
export function panList(query) {
  return request({
    url: '/system/pan/list',
    method: 'get',
    params: query
  })
}

//查询的表头和明细
export function getStoreDetailList(query) {
  return request({
    url: '/system/pan/getStoreDetailList',
    method: 'get',
    params: query
  })
}

//新增盘点单
export function saveNewStorePan(data) {
  return request({
    url: '/system/pan/saveNewStorePan',
    method: 'post',
    data: data
  })
}

//新增盘点单
export function updateStorePan(data) {
  return request({
    url: '/system/pan/del',
    method: 'post',
    data: data
  })
}

//获取盘点记录详情
export function getPanInfo(query) {
  return request({
    url: `/system/pan/${query.id}`,
    method: 'get',
  })
}

//获取盘点记录明细
export function getPanDetail(query) {
  return request({
    // url: `/system/detail/${query.id}`,
    url: `/system/detail/list`,
    method: 'get',
    params: query
  })
}

//删除盘点单
export function deletePanInfo(query) {
  return request({
    url: `/system/pan/${query.id}`,
    method: 'delete',
  })
}


//获取报损单
// export function deletePanInfo(query) {
//   return request({
//     url: `/system/pan/${query.id}`,
//     method: 'delete',
//   })
// }
//
//
//获取报溢/报损单
export function overflowReportList(query) {
  return request({
    url: `/overflow/report/list`,
    method: 'get',
    params:query
  })
}
//获取报溢/报损单明细
export function overflowDetailList(query) {
  return request({
    url: `/overflow/detail/list`,
    method: 'get',
    params:query
  })
}
export function panUpdate(data) {
  return request({
    url: `system/pan`,
    method: 'put',
    data: data
  })
}
export function getAllApprovalList(data) {
  return request({
    url: `/system/pan/getAllApprovalList`,
    method: 'get',
  })
}

export function confirmStorePan(data) {
  return request({
    url: `/system/pan/confirmStorePan`,
    method: 'post',
    data:data
  })
}

//获取报溢/报损单
export function overflowReportUpdate(data) {
  return request({
    url: `/overflow/report`,
    method: 'put',
    data:data
  })
}

